package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName patient_expense
 */
@TableName(value ="patient_expense")
public class PatientExpense {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Registration ID
     */
    @TableField(value = "registration_id")
    private Integer registrationId;

    /**
     * invoice ID
     */
    @TableField(value = "invoice_id")
    private Integer invoiceId;

    /**
     * Item ID
     */
    @TableField(value = "item_id")
    private Integer itemId;

    /**
     * Item type (1=non-drug, 2=drug)
     */
    @TableField(value = "item_type")
    private Integer itemType;

    /**
     * Item name
     */
    @TableField(value = "name")
    private String name;

    /**
     * Unit price
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * Quantity
     */
    @TableField(value = "quantity")
    private BigDecimal quantity;

    /**
     * Execution department ID
     */
    @TableField(value = "department_id")
    private Integer departmentId;

    /**
     * Creation time
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * Creator ID
     */
    @TableField(value = "creator_id")
    private Integer creatorId;

    /**
     * Payment/refund time
     */
    @TableField(value = "payment_time")
    private Date paymentTime;

    /**
     * Cashier ID
     */
    @TableField(value = "cashier_id")
    private Integer cashierId;

    /**
     * Payment method
     */
    @TableField(value = "payment_type")
    private Integer paymentType;

    /**
     * Refund record ID
     */
    @TableField(value = "refund_id")
    private Integer refundId;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Registration ID
     */
    public Integer getRegistrationId() {
        return registrationId;
    }

    /**
     * Registration ID
     */
    public void setRegistrationId(Integer registrationId) {
        this.registrationId = registrationId;
    }

    /**
     * invoice ID
     */
    public Integer getInvoiceId() {
        return invoiceId;
    }

    /**
     * invoice ID
     */
    public void setInvoiceId(Integer invoiceId) {
        this.invoiceId = invoiceId;
    }

    /**
     * Item ID
     */
    public Integer getItemId() {
        return itemId;
    }

    /**
     * Item ID
     */
    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    /**
     * Item type (1=non-drug, 2=drug)
     */
    public Integer getItemType() {
        return itemType;
    }

    /**
     * Item type (1=non-drug, 2=drug)
     */
    public void setItemType(Integer itemType) {
        this.itemType = itemType;
    }

    /**
     * Item name
     */
    public String getName() {
        return name;
    }

    /**
     * Item name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Unit price
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * Unit price
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * Quantity
     */
    public BigDecimal getQuantity() {
        return quantity;
    }

    /**
     * Quantity
     */
    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    /**
     * Execution department ID
     */
    public Integer getDepartmentId() {
        return departmentId;
    }

    /**
     * Execution department ID
     */
    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    /**
     * Creation time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * Creation time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * Creator ID
     */
    public Integer getCreatorId() {
        return creatorId;
    }

    /**
     * Creator ID
     */
    public void setCreatorId(Integer creatorId) {
        this.creatorId = creatorId;
    }

    /**
     * Payment/refund time
     */
    public Date getPaymentTime() {
        return paymentTime;
    }

    /**
     * Payment/refund time
     */
    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }

    /**
     * Cashier ID
     */
    public Integer getCashierId() {
        return cashierId;
    }

    /**
     * Cashier ID
     */
    public void setCashierId(Integer cashierId) {
        this.cashierId = cashierId;
    }

    /**
     * Payment method
     */
    public Integer getPaymentType() {
        return paymentType;
    }

    /**
     * Payment method
     */
    public void setPaymentType(Integer paymentType) {
        this.paymentType = paymentType;
    }

    /**
     * Refund record ID
     */
    public Integer getRefundId() {
        return refundId;
    }

    /**
     * Refund record ID
     */
    public void setRefundId(Integer refundId) {
        this.refundId = refundId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PatientExpense other = (PatientExpense) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRegistrationId() == null ? other.getRegistrationId() == null : this.getRegistrationId().equals(other.getRegistrationId()))
            && (this.getInvoiceId() == null ? other.getInvoiceId() == null : this.getInvoiceId().equals(other.getInvoiceId()))
            && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getItemType() == null ? other.getItemType() == null : this.getItemType().equals(other.getItemType()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId()))
            && (this.getPaymentTime() == null ? other.getPaymentTime() == null : this.getPaymentTime().equals(other.getPaymentTime()))
            && (this.getCashierId() == null ? other.getCashierId() == null : this.getCashierId().equals(other.getCashierId()))
            && (this.getPaymentType() == null ? other.getPaymentType() == null : this.getPaymentType().equals(other.getPaymentType()))
            && (this.getRefundId() == null ? other.getRefundId() == null : this.getRefundId().equals(other.getRefundId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRegistrationId() == null) ? 0 : getRegistrationId().hashCode());
        result = prime * result + ((getInvoiceId() == null) ? 0 : getInvoiceId().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getItemType() == null) ? 0 : getItemType().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode());
        result = prime * result + ((getPaymentTime() == null) ? 0 : getPaymentTime().hashCode());
        result = prime * result + ((getCashierId() == null) ? 0 : getCashierId().hashCode());
        result = prime * result + ((getPaymentType() == null) ? 0 : getPaymentType().hashCode());
        result = prime * result + ((getRefundId() == null) ? 0 : getRefundId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", invoiceId=").append(invoiceId);
        sb.append(", itemId=").append(itemId);
        sb.append(", itemType=").append(itemType);
        sb.append(", name=").append(name);
        sb.append(", price=").append(price);
        sb.append(", quantity=").append(quantity);
        sb.append(", departmentId=").append(departmentId);
        sb.append(", createTime=").append(createTime);
        sb.append(", creatorId=").append(creatorId);
        sb.append(", paymentTime=").append(paymentTime);
        sb.append(", cashierId=").append(cashierId);
        sb.append(", paymentType=").append(paymentType);
        sb.append(", refundId=").append(refundId);
        sb.append("]");
        return sb.toString();
    }
}